package src.com.doit.Demo11;

public class Programmer extends Employee {
    private double projectWage;//项目奖金

    public Programmer(double projectWage) {
        this.projectWage = projectWage;
    }

    public Programmer() {
    }

    public Programmer(String id, String name, double wage, double projectWage) {
        super(id, name, wage);
        this.projectWage = projectWage;
    }

    @Override
    public void calculateWage() {
        System.out.println(getName()+"的基本工资为:"+getWage()+"元");
        System.out.println(getName()+"的项目奖金为:"+projectWage+"元");
        System.out.println(getName()+"的总工资为:"+(projectWage+getWage())+"元");//基本工资+项目奖金
    }
}
